package com.beep.erp.model.earlystage.option;


import android.support.v4.app.Fragment;
import android.view.View;
import android.widget.Button;

import com.beep.erp.R;
import com.beep.erp.common.base.BaseFragment;
import com.beep.erp.common.utils.ToastUtils;
import com.beep.erp.model.earlystage.scan.ScanActivity;
import com.beep.erp.model.earlystage.standard.StandardActivity;
import com.beep.erp.model.stock.StockContract;
import com.beep.erp.model.stock.StockModel;
import com.beep.erp.model.stock.StockPresenter;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * A simple {@link Fragment} subclass.
 */
public class EarlyStageOptionFragment extends BaseFragment<StockPresenter, StockModel> implements StockContract.View {


    @BindView(R.id.btn_sauce_early)
    Button btnSauceEarly;
    @BindView(R.id.btn_standard_early)
    Button btnStandardEarly;
    @BindView(R.id.btn_standard_stage)
    Button btnStandardStage;
    @BindView(R.id.btn_sauce_stage)
    Button btnSauceStage;

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_early_stage_option;
    }

    @Override
    protected void initView(View view) {

    }

    @OnClick({R.id.btn_sauce_early, R.id.btn_sauce_stage, R.id.btn_standard_early, R.id.btn_standard_stage})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_sauce_early:
                //酱料期出
                ScanActivity.start(getActivity(), "1", false);
                break;
            case R.id.btn_sauce_stage:
                //酱料期入
                ScanActivity.start(getActivity(), "3", false);
                break;
            case R.id.btn_standard_early:
                //标准期出
                StandardActivity.start(getActivity(), "2");
                break;
            case R.id.btn_standard_stage:
                //标准期入
                StandardActivity.start(getActivity(), "4");
                break;
        }
    }

    @Override
    protected void lazyLoad() {

    }

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void showMessage(String message) {
        ToastUtils.showShort(message);
    }

    @Override
    public void onResume() {
        super.onResume();
    }
}
